<%@page import="com.test.objects.Author"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>mypage-main</title>
	<link rel="stylesheet" type="text/css" href="./css/template.css" />
	
	<script type="text/javascript" src="./scripts/jquery.min.js"></script>
	<script type="text/javascript" src="./scripts/subfunc.js"></script>
	<script type="text/javascript" src="./scripts/mainfunc.jquery.js"></script>
	<script type="text/javascript" src="./scripts/auto-textarea.jquery.js"></script>

	<script type="text/javascript" src="./scripts/jqueryf/jquery-1.8.0.js"></script>
	<script type="text/javascript" src="./scripts/jqueryf/jquery.form.js"></script>
	
	<style type="text/css">
	
	</style>
</head>

<body onload="setFocus();">
<%@ include file="/WEB-INF/jsp/main/header.jsp" %>
<%
	page = request.getParameter("page") != null ? 
			request.getParameter("page") : "posts";
	String loadingStr = "<div id='loading'>" +
		"<img alt='loading' src='./images/common/ajax-loader.gif'></div>";
%>

<table cellpadding="0" cellspacing="0" border="0" width=100%><tr><td align="center">

<table cellpadding="0" cellspacing="0" border="0" bgcolor="#4682B4" width="800px">
	<tr><td>
		<table cellpadding="0" cellspacing="1" width="100%" border="0">
		<tr><td class="welcome" valign="top" align="left" colspan="2">
			welcome
			<% 
			if (session.getAttribute("author") != null){
				Author author = (Author)session.getAttribute("author");
				out.print("<a href=\"user.m?id="+ author.getId() + "\">" + 
						"<font color=\"#ffffff\">" + author.getFullname() + "</font></a>!");
			}else{
				out.print("<a href=\"login.m\"><font color=\"#ffffff\">guest</font></a>!");
			}
			%>
		</td><td class="welcome" valign="top" align="right"><%= loadingStr %></td></tr>
		<tr><td valign="top" bgcolor="#FFFFFF" width="135">
			<%@ include file="/WEB-INF/jsp/main/left_menu.jsp" %>
		</td>
		<td class="td-common" width="100%" align="center" height="500px">
			<br><div id="main-div" style="width:500px"></div>

<script type="text/javascript">
$(document).ready(function(){
	$('#loading')
    .hide()
    .ajaxStart(function() {
        $(this).fadeIn(300);
    })
    .ajaxStop(function() {
        $(this).fadeOut(300);
    });
	
	$.get('./mainservlet?req=mrcs&offs=0&aId=${authorId}', drawComments, "xml");
	$.get('./mainservlet?req=rel&aId=${authorId}', drawRelations, "xml");
});
</script>

		</td><td class="td-common" width="120px" align="center">
			<div id="relation-div" style="width:120px"></div>
		</td></tr>


	</table>
	</td></tr>
</table>

</td></tr></table>


<%@ include file="/WEB-INF/jsp/main/footer.jsp" %>
</body>
</html>